package ru.pachkun.home.russianpost.info;

import ru.pachkun.home.russianpost.info.logicinterface.NavigationHelperInterface;

public class NavigationHelper extends DriverBasedHelper implements
		NavigationHelperInterface {

	private String baseUrl;
	private ApplicationManager manager;

	public NavigationHelper(ApplicationManager manager) {
		super(manager.getWebDriver());
		this.manager=manager;
		this.baseUrl = manager.getBaseUrl();
	}

	@Override
	public void openMainPage() {
		driver.get(baseUrl);
	}

	@Override
	public void openRelativeUrl(String url) {
		driver.get(baseUrl + url);
	}

	@Override
	public MRPORegistrationHealper clickLinkMRPORegistration (){
		pages.mainPageFrame.clickLinkMRPORegistration().ensurePageLoaded();
		return manager.getMrpoRegistrationHealper();
	}
}
